package com.test.mchelepesa.bean_rice.user_info_rice;

import com.test.mchelepesa.util_rice.StringUtil_rice;
import com.google.gson.Gson;

import org.json.JSONObject;

/**
 * 用户登录信息，只在用户手动登录时获取，自动登录不获取
 */
public class OrderRepaySDK_rice {

    private static class Inner {
        private static OrderRepaySDK_rice instance = new OrderRepaySDK_rice();
    }

    private OrderRepaySDK_rice(){}

    public static OrderRepaySDK_rice getInstance(){
        return Inner.instance;
    }

    private String accessCode,pubKey;

    public static void parse(JSONObject objJson){
        Inner.instance = new Gson().fromJson(objJson.toString(), OrderRepaySDK_rice.class);
    }

    public String getAccessCode() {
        return StringUtil_rice.getSafeString(accessCode);
    }

    public String getPubKey() {
        return StringUtil_rice.getSafeString(pubKey);
    }
}
